#ifndef __Image_Image_h__
#define __Image_Image_h__

#include "Core/BasicTypes.h"

namespace Orca {

	class Texture2d;

	//--------------------------------------------------------------------------
	class Image {

	public:
		Image(uint32 w, uint32 h) : mWidth(w), mHeight(h) {}
		virtual ~Image() {}

		uint32 getWidth() const {return mWidth;}
		uint32 getHeight() const {return mHeight;}

		virtual vec4 getPixelAt(uint32 x, uint32 y) = 0;
		virtual void setPixelAt(uint32 x, uint32 y, const vec4 &rgba) = 0;

		virtual void* getDataPtr() = 0;
		virtual uint32 getPixelSizeInBytes() = 0;

		virtual bool saveToFile(const Str &filename) = 0;

		virtual Texture2d* create2DTexture(bool autoGenMipmap) = 0;

	protected:
		uint32 mWidth;
		uint32 mHeight;

	};
}

#endif	// __Image_Image_h__